fontchooserwidget: Port to listmodels
authorBenjamin Otte <otte@redhat.com>
Thu, 28 Nov 2019 03:00:39 +0000 (04:00 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 30 May 2020 23:26:46 +0000 (19:26 -0400)
commit58b65d1bf62ca2ce50cd82f3cace4840db25af88
tree1fc776366be1f3b916d7750c61d3d8e9b6179866
parent542829ee81f89baf9e4fedc3f9dae063ded81eb9
fontchooserwidget: Port to listmodels

The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.

If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.

These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.
gtk/gtkfontchooserwidget.c
gtk/ui/gtkfontchooserwidget.ui